<?php
## 缓存类文件路径
$cls_arr = File::cache_cls_files();
		
$styles = File::get_styles();
$r = cache_write('styles.php', $styles);

/*
$languages = File::get_languages();
$r = cache_write('languages.php', $languages);

// 清除EA缓存
foreach($languages as $__f_lang_setting){
	//print_r(language_setting);
	$dir = LNG_PTH.$__f_lang_setting['_dir'];
	//echo "<br />\n### {$dir} ###<br />\n";
	if($fh = opendir($dir)){
		while(false !== ($file = readdir($fh))){
			if(eregi("[a-zA-Z0-9]+\.lang\.php$", $file)){
				$filename = str_replace('.lang.php', '', $file);
				$key = md5($__f_lang_setting['_language'].$filename);
				ea_clear($key);
				//echo "{$__f_lang_setting['_language']}/{$filename}<br />\n";
			}
		}
		closedir($fh);
	}
}
*/

// 清除菜单缓存
$key = md5(CAC_PTH.'menus.php');
ea_clear($key);


$oSysVar = new SysVar();
$oSysVar->update(10, array('type' => 3, 'value' => 'php'));
$oSysVar->cache_sysvar();

$oLibrary = new Library();
$oLibrary->cache_library();

$oLang = new Lang();
$oLang->cache_lang();

$oMenu = new Menu();
$cache_menu = $oMenu->cache_menu();

$oRole = new Role();
$cache_role = $oRole->cache_all();

$oManager = new Manager();
$oManager->cache_all();

$oAdpos = new Adpos();
$oAdpos->cache_adpos();

$oAdvert = new Advert();
$oAdvert->cache_advert();

$oGoodscat = new Goodscat();
$oGoodscat->cache_category();

echo '<pre>';
print_r($cls_arr);
print_r($styles);
//print_r($languages);
echo '</pre>';

if($r > 0){
	exit("{$__l['update']}{$__l['success']}");
}else{
	exit("{$__l['update']}{$__l['failure']}");
}
?>